<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>compileAllConfig()</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="api.functions.html" title="Chapter 14. Smarty Class Methods">
<link rel="prev" href="api.clear.config.html" title="clearConfig()">
<link rel="next" href="api.compile.all.templates.html" title="compileAllTemplates()">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">compileAllConfig()</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="api.clear.config.html">Prev</a> </td>
<th width="60%" align="center">Chapter 14. Smarty Class Methods</th>
<td width="20%" align="right"> <a accesskey="n" href="api.compile.all.templates.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="refentry" title="compileAllConfig()">
<a name="api.compile.all.config"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>compileAllConfig() — compiles all known config files</p>
</div>
<div class="refsect1" title="Description">
<a name="id429658"></a><h2>Description</h2>
<code class="methodsynopsis"><span class="type">string </span><span class="methodname">compileAllConfig</span>(<span class="methodparam"><span class="type">string </span><span class="parameter">extension</span></span>,<br>                        <span class="methodparam"><span class="type">boolean </span><span class="parameter">force</span></span>,<br>                        <span class="methodparam"><span class="type">integer </span><span class="parameter">timelimit</span></span>,<br>                        <span class="methodparam"><span class="type">integer </span><span class="parameter">maxerror</span></span>);</code><p>
    This function compiles config files found in the <a class="link" href="variable.config.dir.html" title="$config_dir"><code class="varname">$config_dir</code></a> folder.
    It uses the following parameters:
    </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>
       <em class="parameter"><code>extension</code></em> is an optional string which defines the file extention for the config files. 
       The default is ".conf".
      </p></li>
<li class="listitem"><p>
       <em class="parameter"><code>force</code></em> is an optional boolean which controls if only modified (false) or all (true) config files shall be compiled. 
       The default is "false".
      </p></li>
<li class="listitem"><p>
       <em class="parameter"><code>timelimit</code></em> is an optional integer to set a runtime limit in seconds for the compilation process.
       The default is no limit.
      </p></li>
<li class="listitem"><p>
       <em class="parameter"><code>maxerror</code></em> is an optional integer to set an error limit. If more config files failed to compile the function
       will be aborted. The default is no limit.
      </p></li>
</ul></div>
<p>
  </p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
   This function may not create desired results in all configurations. Use is on own risk.
  </p>
</div>
<p>
   </p>
<div class="example">
<a name="id430192"></a><p class="title"><b>Example 14.14. compileAllConfig()</b></p>
<div class="example-contents"><pre class="programlisting">

&lt;?php
include('Smarty.class.php');
$smarty = new Smarty;

// force compilation of all config files
$smarty-&gt;compileAllConfig('.config',true);

?&gt;

    </pre></div>
</div>
<p><br class="example-break">
  </p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="api.clear.config.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="api.functions.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="api.compile.all.templates.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">clearConfig() </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> compileAllTemplates()</td>
</tr>
</table>
</div>
</body>
</html>
